<%--
    Document   : Register
    Created on : Sep 29, 2012, 4:34:35 PM
    Author     : MinhThang
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" errorPage="error.jsp" %>
<%@page import="org.apt.Bean.MemberEnties"%>
<%@page import="com.myapp.DAO.MemberDao"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="description" content="website description" />
        <meta name="keywords" content="website keywords, website keywords" />
        <meta http-equiv="content-type" content="text/html; charset=windows-1252" />
        <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Tangerine&amp;v1#" />
        <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz" />
        <link rel="stylesheet" type="text/css" href="style/style.css" />
        <style>
            * {font-family:Arial, Helvetica, sans-serif;
               font-size:10pt;}
            .left{
                text-align: left;
                font-weight: bold;
            }
        </style>
        <title>Member</title>
    </head>
    <body>
        <div>
            <div><%@include file="UserTemplate/Banner.jsp" %></div>
            <div id="site_content">
                <form action="MemberEdit.jsp"   method="post"  name="fmember" id="fmember">
                    <div id="content">
                        <%
                                    MemberEnties member = new MemberEnties();
                                    try {
                                        if (session.getAttribute("member") != null) {
                                            member = (MemberEnties) session.getAttribute("member");
                                        } else {
                                            String username = (String) session.getAttribute("UserID");
                                            member = MemberDao.getMemberByUserName(username);
                                        }
                                    } catch (Exception ex) {
                                        response.sendRedirect("error.jsp");
                                    }
                        %>
                        <table  class="tableRegiter" style="width: 99.5%">
                            <tbody>
                                <tr >
                                    <td colspan="4"c class="headerTable"><h3>Infomation of member</h3></td>
                                </tr>
                                <tr>
                                    <td class="left">User Name : </td>
                                    <td class="centerForm"><%=member.getTxtUserName()%></td>
                                    <td class="left">Full Name : </td>
                                    <td class="centerForm"><%=member.getTxtFullName()%></td>
                                </tr>
                                <tr>
                                    <td class="left">Gender : </td>
                                    <td class="centerForm">
                                        <%
                                                    if (member.isTxtgender() == true) {%>
                                        Male
                                        <%} else {%>
                                        Female
                                        <%}%>
                                    </td>
                                    <td class="left">Birth day : </td>
                                    <td class="centerForm"><%=member.getTxtBirthday()%></td>
                                </tr>
                                <tr>
                                    <td class="left">Identity card : </td>
                                    <td class="centerForm"><%=member.getTxtIDCard()%></td>
                                    <td class="left">Email : </td>
                                    <td class="centerForm"><%=member.getTxtEmail()%></td>
                                </tr>
                                <tr>
                                    <td class="left">Mobile Phone : </td>
                                    <td class="centerForm"><%=member.getTxtMobile()%></td>
                                    <td class="left">Home Phone : </td>
                                    <td class="centerForm"><%=member.getTxtHomePhone()%></td>
                                </tr>
                                <tr>
                                    <td class="left">Address : </td>
                                    <td style="vertical-align: top" class="centerForm"><%=member.getTxtAddress()%></td>
                                    <td class="left">Image : </td>
                                    <td class="buttom"><img class="img"  src="images/imagemember/<%=member.getTxtImage()%>" width="130px" height="150px" alt="Not image"/></td>
                                </tr>
                                <tr>
                                    <td  colspan="4">
                                        <center> <a  id="pagestatus" class="buttom" href="MemberEdit.jsp">Edit profile</a>
                                            <a  id="pagestatus" class="buttom" href="ChangePassword.jsp?user=<%=member.getTxtUserName()%>">Change Password</a><br><br>
                                        </center>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </form>
                <div><%@include file="UserTemplate/MenuRight.jsp" %></div>
            </div>
            <div></div>
            <div><%@include file="UserTemplate/Footer.jsp" %></div>
        </div>

        <script type="text/javascript">
            var ng_config = {
                assests_dir: 'assets/'	// the path to the assets directory
            }
        </script>
        <script type="text/javascript" src="ng_all.js"></script>
        <script type="text/javascript" src="components/calendar.js"></script>
        <script type="text/javascript">
            var my_cal;
            ng.ready(function(){
                // creating the calendar
                my_cal = new ng.Calendar({
                    input: 'date1',	// the input field id
                    start_date: 'year - 1',	// the start date (default is today)
                    display_date: new Date()	// the display date (default is start_date)
                });
            });
        </script>
    </body>
</html>